package com.cal.utms.action.payment;

import com.cal.utms.dto.payment.RedemptionInvestmentDto;
import com.cal.utms.model.payment.InvestmentModel;
import com.cal.utms.model.payment.RedemptionModel;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class RedemptionAction extends ActionSupport implements ModelDriven<RedemptionInvestmentDto> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private RedemptionInvestmentDto redinvDto = new RedemptionInvestmentDto();
	InvestmentModel investmentModel = new InvestmentModel();
	RedemptionModel model = new RedemptionModel();
	private int customer_id;
	private int invest_fund_id;
	private int redemtion_id;

	public String getCustomerInvestment() {
		redinvDto.setSuccess(true);
		redinvDto.setRedemptionInvestmentDtos(investmentModel.getCustomerInvestment(customer_id, invest_fund_id));
		return Action.SUCCESS;
	}

	public String getRedemptionsByid() {
		redinvDto.setSuccess(true);
		redinvDto.setRedemptionInvestmentDtos(model.getRedemtion(redemtion_id));
		return Action.SUCCESS;
	}

	public RedemptionInvestmentDto getRedinvDto() {
		return redinvDto;
	}

	public void setRedinvDto(RedemptionInvestmentDto redinvDto) {
		this.redinvDto = redinvDto;
	}

	@Override
	public RedemptionInvestmentDto getModel() {
		return redinvDto;
	}

	public int getCustomer_id() {
		return customer_id;
	}

	public void setCustomer_id(int customer_id) {
		this.customer_id = customer_id;
	}

	public int getInvest_fund_id() {
		return invest_fund_id;
	}

	public void setInvest_fund_id(int invest_fund_id) {
		this.invest_fund_id = invest_fund_id;
	}

	public int getRedemtion_id() {
		return redemtion_id;
	}

	public void setRedemtion_id(int redemtion_id) {
		this.redemtion_id = redemtion_id;
	}

}
